<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title></title>

    <link href="/js/datepicker/datepicker.css" rel="stylesheet">
    <link href="/wenda/styles/wenda.css" rel="stylesheet" type="text/css">
    <link href="/js/plugins/jqPaginator/jqPagination.css" rel="stylesheet" type="text/css">
    <link href="/styles/addtravelnote.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="/js/jquery/jquery.js"></script>
    <script src="/js/plugins/jquery-form/jquery.form.js"></script>
    <script type="text/javascript" src="/wenda/js/wenda.js"></script>
    <script type="text/javascript" src="/js/plugins/jqPaginator/jq-paginator.min.js"></script>



    <link href="/styles/base.css" rel="stylesheet" type="text/css">
    <link href="/js/ueditor/themes/default/css/umeditor.css" type="text/css" rel="stylesheet">
    <script type="text/javascript" charset="utf-8" src="/js/ueditor/umeditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="/js/ueditor/umeditor.min.js"></script>
    <script type="text/javascript" src="/js/ueditor/lang/zh-cn/zh-cn.js"></script>
    <script src="/js/datepicker/datepicker.js"></script>

    <link href="/js/plugins/chosen/chosen.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="/js/plugins/chosen/chosen.jquery.js"></script>
    <script type="text/javascript" src="/js/system/common.js"></script>
    <script type="text/javascript" src="/wenda/js/addtravelnote.js"></script>

    <script type="text/javascript" src="/js/system/common.js"></script>

    <script type="text/javascript" src="/js/system/htmlRefresh.js"></script>
    <script>
        $(function () {
            $(".chose_pic").click(function () {
                $("#coverBtn").click();
            })
            $("#coverBtn").change(function () {
                if(this.value){
                    $("#coverForm").ajaxSubmit(function (data) {
                        $(".choseBtn").html(" + 重新选择");
                        $("#coverImage").attr("src", "/" +data);
                        $("#coverValue").val("/" + data);
                    })
                }
            })

            //保存或发表
            $(".btn_submit").click(function () {
                var content = $("#title").val();
                if (!content) {
                        popup("标题内容必填");
                    return;
                }
                $("#state").val($(this).data("status"));
                $("#editForm").ajaxSubmit(function (data) {

                    if(data.success){
                        window.location.href = "/ask/answer/toDetail?id=" + data.data
                    }else{
                        popup("操作失败");
                    }
                })
            })




        })
    </script>
</head>


<body>
        <div class="topBar">
            <div class="topBarC">
                <div class="logo"><a title="马蜂窝自由行" href="javascript:;">马蜂窝自由行</a></div>
                <div class="t_nav">
                    <ul id="pnl_nav" data-cs-t="headnav_wo">
                        <li data-cs-p="index">
                            <strong class="t"><a href="/">首页</a></strong>
                        </li>
                        <li data-cs-t="wenda" data-cs-p="wenda">
                            <strong class="t"><a data-cs-p="from_wo_nav" href="/ask">问答</a></strong>
                        </li>
                        <li data-cs-t="things" data-cs-p="things">
                            <strong class="t"><a data-cs-p="from_wo_nav" href="javascript:;">马蜂窝周边</a></strong>
                        </li>
                        <li data-cs-p="together">
                            <strong class="t"><a href="javascript:;">结伴</a></strong>
                        </li>
                        <li data-cs-p="group">
                            <strong class="t"><a href="javascript:;">小组</a></strong>
                        </li>
                        <li data-cs-p="mall">
                            <strong class="t"><a href="javascript:;">蜂首俱乐部</a></strong>
                        </li>
                        <li class="drop" data-cs-p="other">
                            <strong class="t"><a href="javascript:;">更多<b></b></a></strong>
                        </li>
                    </ul>
                </div>
                <div class="t_search">
                    <form method="GET" action="/search/s.php" name="search">
                        <input type="text" class="key" value="" name="q" id="word">
                        <input type="submit" value="" class="btn">
                    </form>
                </div>

                <div class="t_info">
                    <div class="pagelet-block">
                        <ul class="user_info">
                            <li class="daka">
                      <span class="daka_btn" id="_j_dakabtn" data-japp="daka">
                        <a role="button" title="打卡" class="daka_before">打卡</a>
                        <a role="button" title="打卡推荐" class="daka_after">打卡推荐</a>
                      </span>
                            </li>
                            <li id="pnl_user_msg" data-hoverclass="on" class="msg _j_hoverclass">
                                <span id="oldmsg" class="oldmsg"><a href="javascript:;" class="infoItem">消息<b></b></a></span>
                                <ul id="head-msg-box" class="drop-bd">
                                    <li><a href="javascript:;" rel="nofollow">私信</a></li>
                                    <li><a href="javascript:;" rel="nofollow">小组消息</a></li>
                                    <li><a href="javascript:;" rel="nofollow">系统通知</a></li>
                                    <li><a href="javascript:;" rel="nofollow">问答消息</a></li>
                                    <li><a href="javascript:;" rel="nofollow">回复消息</a></li>
                                    <li><a href="javascript:;" rel="nofollow">喜欢与收藏</a></li>
                                    <li><a href="javascript:;" rel="nofollow">好友动态</a></li>
                                </ul>
                            </li>
                            <li class="ub-item ub-new-msg" id="head-new-msg">
                            </li>
                            <li class="account _j_hoverclass" data-hoverclass="on" id="pnl_user_set">
                      <span class="t"><a class="infoItem" href="/mine/home"><img
                              src="${(user.headImgUrl)!}"
                              width="32" height="32" align="absmiddle"><b></b></a></span>
                                <div class="uSet c">
                                    <div class="asset">
                                        <a class="coin" href="javascript:;" target="_blank" rel="nofollow">蜂蜜 0</a>
                                        /
                                        <a class="coin" href="javascript:;" target="_blank" id="head-my-honey" rel="nofollow"
                                           data-cs-p="coin">金币 579</a>
                                    </div>
                                    <a href="javascript:;">我的马蜂窝<b class="tb-level">LV.3</b></a>
                                    <a href="javascript:;" target="_blank">写游记</a>
                                    <a href="javascript:;" target="_blank">预约游记</a>
                                    <a href="javascript:;" target="_blank">我的足迹</a>
                                    <a href="javascript:;" target="_blank">我的问答</a>
                                    <a href="javascript:;" target="_blank">我的好友</a>
                                    <a href="javascript:;" target="_blank">我的收藏</a>
                                    <a href="javascript:;" target="_blank">我的路线</a>
                                    <a href="javascript:;" target="_blank">我的订单</a>
                                    <a href="javascript:;" target="_blank">我的优惠券</a>
                                    <a href="javascript:;" target="_blank">设置</a>
                                    <a href="javascript:;">退出</a>
                                </div>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    <!--文件上传-->
    <form action="/coverImageUpload" method="post" id="coverForm">
        <input type="file" name="pic" id="coverBtn" style="display: none;">
    </form>


<br>
<br>
<br>
    <div class="wrapper">
        <div class="ap-head">
            <dl d-data="1" class="on">
                <dt>旅游问答</dt>
                <dd>关联至当前游客问题</dd>
            </dl>
            <div class="clearfix"></div>
        </div>
        <div class="ap-wrap">
            <div class="ap-main">
                <form class="forms" action="/ask/answer/save" method="post" id="editForm">
                    <input type="hidden" name="ask.id" value="${(askId)!}">
                    <input type="hidden" name="state" id="state">

                    <h2 >请输入标题</h2>
                    <br/>
                    <dl class="title cf">

                        <dd>
                            <label class="" style="display: block;">请在这里输入标题</label>
                            <span class="char-limit _j_char_limit hide">可输入<strong>48</strong>字</span>
                            <input id="title" name="title" type="text" maxlength="48"  >
                        </dd>
                    </dl>

                    <dl class="body cf">
                        <dd id="content_div">
                            <script id="editor" type="text/plain" style="width:100%;height:300px;"></script>
                        </dd>
                    </dl>
                    <div class="btns">
                        <input class="btn_submit" value="回答问题" type="button" data-status="0">

                    </div>
                </form>
                                <br>
                                <br>
                                <br>

            </div>
        </div>
    </div>
  <br>
    <#include "../common/footer.ftl">
</body>

</html>